from django.shortcuts import render

# Create your views here.
from rest_framework import request
from rest_framework.generics import ListAPIView, RetrieveAPIView
from .serializers import ActivityListSerializers, ActivityDetailSerializers
from .models import Activity


class ActivityListView(ListAPIView):
    """
    活动列表视图
    """
    serializer_class = ActivityListSerializers
    queryset = Activity.objects.all()


class ActivityDetailView(RetrieveAPIView):
    """
    活动详情视图
    """
    serializer_class = ActivityDetailSerializers
    queryset = Activity.objects.all()